import request from '@/utils/request'
export function getOrderList(params){
	return request(
	{
		url:"/h5/order/getList",
		method:'get',
		params:params
	})
}
export function getOneOrder(params){
	return request(
	{
		url:"/h5/order/getOne",
		method:'get',
		params:params
	})
}

export function getCompany(query){
	console.log("请求参数："+query)
	return request({
		url:'/h5/merchant/list',
		method:'get',
		'params': query
	})
}

export function getDetail(query){
	return request({
		url:'/h5/orderDetail/getAll',
		method:'get',
		params:query
	})
}

export function delOrder(query){
	return request({
		url:'/h5/order/'+query,
		method:'delete'
	})
}

export function createOrder(data){
	return request({
		url:'/h5/order',
		method:'post',
		data:data
	})
}
export function editOrder(data){
	return request({
		url: '/h5/order',
		method:'put',
		data:data
	})
}

export function getGoods(query){
	console.log("请求参数："+query)
	return request({
		url:'/h5/shop/list',
		method:'get',
	})
}

export function addGoods(data){
	return request({
		url:'/h5/orderDetail',
		method:'post',
		data:data
	})
}
